home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / patches / pgs3g1.lha / 3.0gUpdate / PostScript.lha / PostScript.prolog < prev   
Text File  |  1995-03-24  |  26KB  |  898 lines

  1. %%BeginProlog
  2. % $VER: PostScript.prolog 1.0f (15.03.95)
  3. % fixed picstr problem in BeginRGBBitmap (7.10.94)
  4. % added font reencoding support (29.10.94)
  5. % complete change to fill/stroke for support for text (02.02.95)
  6. % fixed landscape to non-letter sizes
  7. % fixed grave/quotesingle encoding (15.02.95)
  8. % changed for new tm2d based code w/ new object calls (15.03.95)
  9. % fixed process color seps (24.03.95)
  10. %Copyright 1994-95 Soft-Logik Publishing Corp.
  11.  
  12. /AsphaltDict dup 153 dict def load begin
  13.  
  14. %
  15. % basic definitions
  16. %
  17. /bdef {bind def}bind def
  18. /xdef {exch def}bdef
  19. /ldef {load def}bdef
  20. /dmatrix matrix def
  21. /tmatrix matrix def
  22. /pmatrix matrix def
  23. /omatrix matrix def
  24.  
  25. /deltax 0 def
  26. /deltay 0 def
  27. /slant 0 def
  28. /twist 0 def
  29. /xscl 0 def
  30. /yscl 0 def
  31. /bang 0 def
  32. /eang 0 def
  33.  
  34. /tilescalex 0 def
  35. /tilescaley 0 def
  36. /bh 0 def
  37. /bv 0 def
  38.  
  39. %
  40. % fill defines
  41. %
  42. /SG /setgray ldef
  43. systemdict /setcmykcolor known not
  44.  {/SCMYK {1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef}
  45.  {/SCMYK /setcmykcolor ldef}ifelse
  46.  
  47. %
  48. % drawing definitions
  49. %
  50. /sclm [0 0 0 0 0 0] def
  51. /scl{deltay sub exch deltax sub exch transform round .2 add exch round .2 add exch itransform}bdef
  52.  
  53. %
  54. %
  55. %
  56. /PGSEncoding 256 array def
  57. % duplicates: acute, quoteleft, quoteright
  58. % 000-007
  59. /.notdef        /dotlessi        /grave            /acute            /circumflex        /tilde            /breve            /dotaccent
  60. % 010-017
  61. /ring            /hungarumlaut    /ogonek            /caron            /.notdef        /.notdef        /.notdef        /.notdef
  62. % 020-027
  63. /quotedblbase    /quotesinglbase    /quotesingle    /quoteleft        /quoteright        /.notdef        /.notdef        /.notdef
  64. % 030-037
  65. /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef
  66. % 040-047
  67. /space            /exclam            /quotedbl        /numbersign        /dollar            /percent        /ampersand        /quotesingle
  68. % 050-057
  69. /parenleft        /parenright        /asterisk        /plus            /comma            /hyphen            /period            /slash
  70. % 060-067
  71. /zero            /one            /two            /three            /four            /five            /six            /seven
  72. % 070-077
  73. /eight            /nine            /colon            /semicolon        /less            /equal            /greater        /question
  74. % 100-107
  75. /at                /A                /B                /C                /D                /E                /F                /G
  76. % 110-117
  77. /H                /I                /J                /K                /L                /M                /N                /O
  78. % 120-127
  79. /P                /Q                /R                /S                /T                /U                /V                /W
  80. % 130-137
  81. /X                /Y                /Z                /bracketleft    /backslash        /bracketright    /asciicircum    /underscore
  82. % 140-147
  83. /grave            /a                /b                /c                /d                /e                /f                /g
  84. % 150-157
  85. /h                /i                /j                /k                /l                /m                /n                /o
  86. % 160-167
  87. /p                /q                /r                /s                /t                /u                /v                /w
  88. % 170-177
  89. /x                /y                /z                /braceleft        /bar            /braceright        /asciitilde        /.notdef
  90. % 200-207
  91. /perthousand    /florin            /notequal        /infinity        /lessequal        /greaterequal    /.notdef        /.notdef
  92. % 210-217
  93. /ellipsis        /endash            /emdash            /quotedblleft    /quotedblright    /guilsinglleft    /guilsinglright    /pi                
  94. % 220-227
  95. /fraction        /dagger            /daggerdbl        /trademark        /bullet            /fi                /fl                /Ydieresis        
  96. % 230-237
  97. /Lslash            /lslash            /OE                /oe                /Scaron            /scaron            /Zcaron            /zcaron            
  98. % 240-247
  99. /space            /exclamdown        /cent            /sterling        /currency        /yen            /brokenbar        /section
  100. % 250-257
  101. /dieresis        /copyright        /ordfeminine    /guillemotleft    /logicalnot        /minus            /registered        /macron
  102. % 260-267
  103. /degree            /plusminus        /twosuperior    /threesuperior    /acute            /mu                /paragraph        /periodcentered
  104. % 270-277
  105. /cedilla        /onesuperior    /ordmasculine    /guillemotright    /onequarter        /onehalf        /threequarters    /questiondown
  106. % 300-307
  107. /Agrave            /Aacute            /Acircumflex    /Atilde            /Adieresis        /Aring            /AE                /Ccedilla
  108. % 310-317
  109. /Egrave            /Eacute            /Ecircumflex    /Edieresis        /Igrave            /Iacute            /Icircumflex    /Idieresis
  110. % 320-327
  111. /Eth            /Ntilde            /Ograve            /Oacute            /Ocircumflex    /Otilde            /Odieresis        /multiply
  112. % 330-337
  113. /Oslash            /Ugrave            /Uacute            /Ucircumflex    /Udieresis        /Yacute            /Thorn            /germandbls
  114. % 340-347
  115. /agrave            /aacute            /acircumflex    /atilde            /adieresis        /aring            /ae                /ccedilla
  116. % 350-357
  117. /egrave            /eacute            /ecircumflex    /edieresis        /igrave            /iacute            /icircumflex    /idieresis
  118. % 360-367
  119. /eth            /ntilde            /ograve            /oacute            /ocircumflex    /otilde            /odieresis        /divide
  120. % 370-377
  121. /oslash            /ugrave            /uacute            /ucircumflex    /udieresis        /yacute            /thorn            /ydieresis
  122. PGSEncoding 0 256 getinterval astore pop
  123.  
  124. %
  125. % path constructors
  126. %
  127. % - N -
  128. /N/newpath ldef
  129.  
  130. % x y M -
  131. /M{scl moveto}bdef
  132.  
  133. % x y L -
  134. /L{scl lineto}bdef
  135.  
  136. % cx1 cy1 cx2 cy2 px2 py2 C -
  137. /C{scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto}bdef
  138.  
  139. % cx cy rx ry ba ea slant twist A -
  140. /A{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  141. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arc omatrix setmatrix}bdef
  142.  
  143. % cx cy rx ry ba ea slant twist AN -
  144. /AN{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  145. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arcn omatrix setmatrix}bdef
  146.  
  147. % - CP -
  148. /CP{closepath}bdef
  149.  
  150. %
  151. % pattern fill operators
  152. %
  153. % - patternpath -
  154. /patternpath{ %bdef
  155.   /mypatternfont findfont begin FontDict /ctm get setmatrix
  156.   currentdict setfont
  157.  
  158.   FontDict begin
  159.     FontMatrix concat
  160.     width 0 dtransform
  161.     round width div exch round width div exch
  162.     0 height dtransform
  163.     round height div exch
  164.     round height div exch
  165.     0 0 transform round exch round exch
  166.     ptm astore setmatrix
  167.     pathbbox
  168.     height div ceiling height mul 4 1 roll
  169.     width div ceiling width mul 4 1 roll
  170.     height div floor height mul 4 1 roll
  171.     width div floor width mul 4 1 roll
  172.     2 index sub height div ceiling cvi exch
  173.     3 index sub width div ceiling cvi exch
  174.     4 2 roll moveto
  175.     FontMatrix ptm invertmatrix pop
  176.     { %repeat
  177.       gsave
  178.       ptm concat
  179.       dup str length idiv {str show}repeat
  180.       dup str length mod str exch 0 exch getinterval show
  181.       grestore
  182.       0 height rmoveto
  183.     }repeat
  184.     pop
  185.   end end
  186. }bdef
  187.  
  188. % - patternfill -
  189. /patternfill{ %bdef
  190.   gsave
  191.   1 setgray
  192.   fill
  193.   grestore
  194.  
  195.   gsave
  196.   clip patternpath
  197.   grestore
  198.   newpath
  199. }bdef
  200.  
  201. % - patterneofill -
  202. /patterneofill{ %bdef
  203.   gsave
  204.   1 setgray
  205.   eofill
  206.   grestore
  207.  
  208.   gsave
  209.   eoclip patternpath
  210.   grestore
  211.   newpath
  212. }bdef
  213.  
  214. % - patternstroke -
  215. /patternstroke{ %bdef
  216.   strokepath
  217.   gsave
  218.   1 setgray
  219.   eofill
  220.   grestore
  221.  
  222.   gsave
  223.   clip patternpath
  224.   grestore
  225.   newpath
  226. }bdef
  227.  
  228. % <pattern> P -
  229. /P{
  230.  /pattern xdef
  231.  /mypatternfont findfont begin
  232.  FontDict begin
  233.  true
  234.   0 1 patterncount 1 sub {
  235.    dup patterns exch get pattern eq
  236.       {0 1 str length 1 sub{str exch 2 index put}for pop pop false exit}
  237.    if
  238.    pop
  239.  }for
  240.  {
  241.    patterns patterncount pattern put
  242.     0 1 str length 1 sub {str exch patterncount put}for
  243.    /patterncount patterncount 1 add def
  244.  }if
  245.  end
  246.  end
  247.  /FILL{patternfill}bdef
  248.  /EOFILL{patterneofill}bdef
  249.  /STROKE{patternstroke}bdef
  250. }bdef
  251.  
  252. /S{
  253.  /FILL{fill}bdef
  254.  /EOFILL{eofill}bdef
  255.  /STROKE{stroke}bdef
  256. }bdef
  257.  
  258. %
  259. % gradient/radial/shape fill operators
  260. %
  261. /DOGRAD{
  262.  gsave pmatrix setmatrix flattenpath exec 
  263.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  264.  angle 0 lt{/angle angle 360 add def}if
  265.  angle 180 gt{/angle angle 180 sub def tc1 tc2 /tc1 xdef /tc2 xdef}if
  266.  angle 90 gt{ /quad {ury exch sub}bdef tc1 tc2 /tc1 xdef /tc2 xdef}{ /quad {lly add}bdef}ifelse
  267.  /l urx llx sub def
  268.  /w ury lly sub def
  269.  /v angle dup 90 gt{90 sub neg 90 add}if dup sin l mul exch cos w mul add 2 mul def
  270.  /d angle dup 90 gt{90 sub neg 90 add}if dup sin w mul exch cos l mul add def
  271.  /steps d 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  272.  /dd d steps div def
  273.  
  274.  0 1 steps
  275.  {
  276.   steps div dup /frac xdef ramp /rfrac xdef
  277.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  278.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  279.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  280.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add scmyk
  281.  
  282.   newpath gsave
  283.   l frac mul llx add
  284.   w frac mul quad translate angle rotate 
  285.   dd 2 div neg v 2 div neg moveto
  286.   0 v rlineto dd 0 rlineto 0 v neg rlineto closepath
  287.   FILL grestore
  288.  }for
  289.  
  290.  grestore
  291. }bdef
  292.  
  293. %
  294. %
  295. /DORADIAL{
  296.  gsave pmatrix setmatrix flattenpath exec 
  297.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  298.  /xc llx urx add 2 div dx add def
  299.  /yc lly ury add 2 div dy add def
  300.  /radius llx xc sub abs dup mul sqrt lly yc sub abs dup mul sqrt add def
  301.  
  302.  /steps radius 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  303.  
  304.  steps -1 0
  305.  {
  306.   steps div dup /frac xdef ramp /rfrac xdef
  307.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  308.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  309.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  310.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add scmyk
  311.   newpath xc yc radius frac mul 0 360 arc FILL
  312.  }for
  313.  
  314.  grestore
  315. }bdef
  316.  
  317. %
  318. %
  319. /DOSHAPE{
  320.  /steps 30 def
  321.  /fillproc xdef
  322.  
  323.  currentflat mark currentflat
  324.  {
  325.   {
  326.    dup setflat mark fillproc
  327.  
  328.    tc1 0 get tc1 1 get tc1 2 get tc1 3 get scmyk
  329.    currentflat mark currentflat
  330.    {
  331.     dup setflat mark
  332.     {FILL}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  333.    }loop
  334.    cleartomark setflat
  335.  
  336.    steps -1 0
  337.    {
  338.     steps div dup /frac xdef ramp /rfrac xdef
  339.     tc1 0 get tc2 0 get sub rfrac mul tc2 0 get add
  340.     tc1 1 get tc2 1 get sub rfrac mul tc2 1 get add
  341.     tc1 2 get tc2 2 get sub rfrac mul tc2 2 get add
  342.     tc1 3 get tc2 3 get sub rfrac mul tc2 3 get add scmyk
  343.     []0 setdash xc 2 mul frac mul setlinewidth
  344.  
  345.     currentflat mark currentflat
  346.     {
  347.      dup setflat mark
  348.      {STROKE}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  349.     }loop
  350.     cleartomark setflat
  351.  
  352.    }for
  353.   }
  354. %  gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  355.   gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {exit}if}{cleartomark exit}ifelse
  356.  }loop
  357.  cleartomark setflat
  358. }bdef
  359.  
  360. %
  361. % join miterlimit cap [dashpattern] dashoffset width ST -
  362. %
  363. /ST {
  364.  setlinewidth setdash setlinecap
  365.  2 div sin 1 exch div setmiterlimit
  366.  setlinejoin strokepath
  367. }bdef
  368.  
  369. % fill functions
  370. %
  371. % endfunc scale angle x y LNE -
  372. %
  373. /LNE {
  374.  scl translate rotate dup scale
  375.  load exec
  376.  omatrix setmatrix
  377. }bdef
  378.  
  379. %
  380. % screen spot functions
  381. %
  382. /SSNewDot {180 mul cos exch 180 mul cos add 2 div}bdef
  383. /SSDot {dup mul exch dup mul add 1.0 exch sub}bdef
  384. /SSRing {dup mul exch dup mul add 1.0 exch sub abs 1.0 exch sub}bdef
  385. /SSDonut {dup mul exch dup mul add sqrt .5 sub abs 1.0 exch sub}bdef
  386. /SSLine {exch pop abs}bdef
  387. /SSTriangle {2 exch sub exch abs 2 mul sub 3 div}bdef
  388. /SSPropeller {/y xdef /x xdef y x .001 add atan cvi 72 mod 72 sub abs 72 div y y mul x x mul add 1 exch sub add 2 div}bdef
  389.  
  390. %
  391. % fountain blend functions
  392. %
  393. /FBLinear {}bdef
  394. /FBInvLinear {1 exch sub}bdef
  395. /FBLog {9 mul 1 add log}bdef
  396. /FBInvLog {9 mul 1 add log 1 exch sub}bdef
  397. /FBSin {180 mul sin}bdef
  398. /FBInvSin {180 mul sin 1 exch sub}bdef
  399. /FBSaw {2 mul dup 1 gt {2 exch sub}if}bdef
  400. /FBInvSaw {2 mul dup 1 gt {2 exch sub}if 1 exch sub}bdef
  401.  
  402. %
  403. % line end functions
  404. %
  405. /LERound {0 0 moveto 0 0 .5 -90 90 arc closepath}bdef
  406. /LEArrow {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  407. /LEArrow1 {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  408. /LEArrow2 {0 0 moveto -2 2 lineto 6 0 lineto -2 -2 lineto closepath}bdef
  409. /LEArrow3 {6 0 moveto -3 0 2.31 300 60 arc closepath}bdef
  410. /LEArrow4 {-1 0 moveto -4 2 .5 240 60 arcn 0 0 .5 60 300 arcn -4 -2 .5 300 120 arcn closepath}bdef
  411. /LESpike1 {0 .5 moveto .5 2 lineto 1 .5 lineto 6 0 lineto 1 -.5 lineto .5 -2 lineto 0 -.5 lineto closepath}bdef
  412. /LESpike2 {0 .5 moveto 2 2 lineto 6 0 lineto 2 -2 lineto 0 -.5 lineto closepath}bdef
  413. /LEFeather1 {-2 0 moveto 0 2 lineto 6 2 lineto 4 0 lineto 6 -2 lineto 0 -2 lineto closepath}bdef
  414. /LEFeather2 {0 -2 moveto 0 0 2 270 90 arcn 6 0 2 90 270 arc closepath}bdef
  415. /LEBox {-2 0 moveto -2 2 lineto 2 2 lineto 2 -2 lineto -2 -2 lineto closepath}bdef
  416. /LEDiamond {-2 0 moveto 0 2 lineto 2 0 lineto 0 -2 lineto closepath}bdef
  417. /LEBall {0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  418. /LEEllipse {2 1 scale 0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  419.  
  420. %
  421. % freq angle spot SS -
  422. %
  423. /SS {
  424.  load setscreen
  425. }bdef
  426.  
  427. %
  428. % text prototypes
  429. %
  430. % (string) F1 -
  431. % (string) kernamt F2 -
  432. % (string) skernamt F3 -
  433. % (string) skernamt kernamt F4 -
  434. %
  435.  
  436. %
  437. % c m y k CMYK -
  438. %
  439. /CMYK {
  440.  scmyk
  441.  
  442.  /FP{FILL}bdef
  443.  /EP{EOFILL}bdef
  444.  /SP{STROKE}bdef
  445.  
  446.  /F1{show}bdef
  447.  /F2{exch 0 exch ashow}bdef
  448.  /F3{exch 0 exch 32 exch widthshow}bdef
  449.  /F4{0 exch 32 exch 0 6 -1 roll awidthshow}bdef
  450.  
  451.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  452.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  453.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  454.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  455. }bdef
  456.  
  457. %
  458. % angle /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKGRAD -
  459. %
  460. /CMYKGRAD{
  461.  /tc2 xdef
  462.  /tc1 xdef
  463.  /ramp exch ldef
  464.  /angle xdef
  465.  
  466.  /FP{{clip} DOGRAD}bdef
  467.  /EP{{eoclip} DOGRAD}bdef
  468.  /SP{strokepath {clip} DOGRAD}bdef
  469.  
  470.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  471.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  472.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  473.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  474.  
  475.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  476.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  477.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  478.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  479. }bdef
  480.  
  481. %
  482. % dx dy /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKRADIAL -
  483. %
  484. /CMYKRADIAL{
  485.  /tc2 xdef
  486.  /tc1 xdef
  487.  /ramp exch ldef
  488.  /dy xdef
  489.  /dx xdef
  490.  
  491.  /FP{{clip} DORADIAL}bdef
  492.  /EP{{eoclip} DORADIAL}bdef
  493.  /SP{strokepath {clip} DORADIAL}bdef
  494.  
  495.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  496.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  497.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  498.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  499.  
  500.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  501.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  502.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  503.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  504. }bdef
  505.  
  506. %
  507. % inset /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKSHAPE -
  508. %
  509. /CMYKSHAPE{
  510.  /tc2 xdef
  511.  /tc1 xdef
  512.  /ramp exch ldef
  513.  /xc xdef
  514.  
  515.  /FP{{clip} DOSHAPE}bdef
  516.  /EP{{eoclip} DOSHAPE}bdef
  517.  /SP{strokepath {clip} DOSHAPE}bdef
  518.  
  519.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  520.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  521.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  522.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  523.  
  524.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  525.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  526.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  527.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  528. }bdef
  529.  
  530.  
  531. /installcolor {
  532.  dup type /stringtype eq {pop dangle}if exch dup type /stringtype eq {pop dfreq}if exch /dspot load setscreen
  533.  
  534.  /sepmode xdef
  535.  
  536.  sepmode 1 eq {
  537.   /scmyk{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef
  538.   /setgray /SG load def
  539.  }if
  540.  
  541.  sepmode 2 eq {
  542.   /scmyk /SCMYK load def
  543.   /setgray /SG load def
  544.  }if
  545.  
  546.  sepmode 3 eq {
  547.   /sepcolor xdef
  548.   sepcolor 0 get 0 ne {/scmyk {pop pop pop 1 exch sub SG}bdef /setgray {pop 1 SG}bdef}if
  549.   sepcolor 1 get 0 ne {/scmyk {pop pop 1 exch sub SG pop}bdef /setgray {pop 1 SG}bdef}if
  550.   sepcolor 2 get 0 ne {/scmyk {pop 1 exch sub SG pop pop}bdef /setgray {pop 1 SG}bdef}if
  551.   sepcolor 3 get 0 ne {/scmyk {1 exch sub SG pop pop pop}bdef /setgray /SG load def}if
  552.  }if
  553.  
  554.  sepmode 4 eq {
  555.   /sepcolor xdef
  556.   /scmyk {
  557.    sepcolor 3 get eq exch
  558.    sepcolor 2 get eq and exch
  559.    sepcolor 1 get eq and exch
  560.    sepcolor 0 get eq and {0 SG}{1 SG}ifelse}bdef
  561.   sepcolor 3 get 1 eq sepcolor 2 get 0 eq and sepcolor 1 get 0 eq and sepcolor 0 get 0 eq and {/setgray /SG load def}{/setgray {pop 1 SG}bdef}ifelse
  562.  }if
  563.  /setcmykcolor /scmyk load def
  564.  
  565.  currentscreen /cspot xdef /cangle xdef /cfreq xdef
  566. }bdef
  567.  
  568. %
  569. % #copies BEGINDOCUMENT -
  570. %
  571. /BeginDocument{
  572.  /#copies xdef
  573.  
  574.   7 dict begin
  575.     /FontDict 12 dict def
  576.     FontDict begin
  577.       /key /mypatternfont def
  578.       /patterns 256 array def
  579.       /patterncount 0 def
  580.       /char 0 def
  581.       /mtx [300 72 div 0 0 300 72 div 0 0] matrix invertmatrix def
  582.       /height 30 def
  583.       /width 30 def
  584.       /ctm matrix currentmatrix def
  585.       /ptm matrix identmatrix def
  586.       /str 32 string def
  587.     end
  588.     /FontBBox [0 0 FontDict /width get FontDict /height get] def
  589.     /FontMatrix FontDict /mtx get def
  590.     /Encoding 256 array 0 1 255 {1 index exch dup 3 string cvs cvn put}for def
  591.     /FontType 3 def
  592.     /BuildChar { %def
  593.       exch begin
  594.       FontDict begin
  595.       /char xdef
  596.        width 0 0 0 width height setcachedevice
  597.       width height scale 8 8 true [8 0 0 -8 0 8] {patterns char get}imagemask
  598.       end end
  599.     }def
  600.     FontDict /key get currentdict definefont pop
  601.   end
  602.  
  603.  /dmatrix dmatrix currentmatrix def
  604.  currentscreen /dspot xdef /dangle xdef /dfreq xdef
  605. }bdef
  606.  
  607. %
  608. % /newfontname /fontname RE -
  609. %
  610. /RE{
  611.  findfont dup length dict begin { %forall
  612.   1 index /FID ne {def}{pop pop}ifelse
  613.  }forall
  614.  /Encoding PGSEncoding def
  615.  /FontName 1 index def
  616.  currentdict definefont pop
  617.  end
  618. }bdef
  619.  
  620. %
  621. % /fontname xscale yscale F -
  622. %
  623. /f{
  624.  /yscale xdef /xscale xdef
  625.  findfont [xscale 0 0 yscale 0 0] makefont setfont
  626. }bdef
  627.  
  628. %
  629. % - ENDOCUMENT -
  630. %
  631. /EndDocument{
  632. }bdef
  633.  
  634. %
  635. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) tilew tileh landscape scaleh scalex paperw paperh BEGINTILE -
  636. %
  637. /BeginTile{
  638.  2 div exch 2 div exch translate
  639.  /tilescaley xdef /tilescalex xdef tilescalex tilescaley scale
  640.  {90 rotate} if
  641.  -2 div exch -2 div exch translate
  642.  
  643.  installcolor
  644.  
  645.  /tmatrix tmatrix currentmatrix def
  646. }bdef
  647.  
  648. %
  649. % - ENDTILE -
  650. %
  651. /EndTile{
  652.  dmatrix setmatrix
  653. }bdef
  654.  
  655. %
  656. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) title left top right bottom THUMBNAILMARKS -
  657. %
  658. /ThumbnailMarks{
  659.  /tiley2 xdef
  660.  /tilex2 xdef
  661.  /tiley1 xdef
  662.  /tilex1 xdef
  663.  /title1 xdef
  664.  
  665.  tmatrix setmatrix
  666.  .5 SG 6 setlinewidth
  667.  newpath
  668.  tilex1 3 add tiley2 3 sub moveto
  669.  tilex2 3 add tiley2 3 sub lineto
  670.  tilex2 3 add tiley1 3 sub lineto stroke
  671.  
  672.  0 SG [] 0 setdash .3 setlinewidth 0 setlinejoin 0 setlinecap
  673.  newpath tilex1 tiley1 moveto tilex2 tiley1 lineto tilex2 tiley2 lineto tilex1 tiley2 lineto closepath stroke
  674.  
  675.  gsave tilex1 tilex2 add 2 div tiley2 translate 1 tilescalex div 1 tilescaley div scale -2 -6 bv sub translate
  676.  /Courier findfont 6 scalefont setfont
  677.  0 0 moveto title1 show
  678.  grestore
  679.  
  680.  installcolor
  681. }bdef
  682.  
  683. %
  684. % left top BEGINPAGE
  685. %
  686. /BeginPage{
  687.  tmatrix setmatrix translate 
  688.  /pmatrix pmatrix currentmatrix def
  689. }bdef
  690.  
  691. %
  692. % ENDPAGE
  693. %
  694. /EndPage{
  695.  tmatrix setmatrix
  696. }bdef
  697.  
  698. %
  699. % aboutx abouty slant twist BO
  700. %
  701. /BO{
  702.  /twist xdef
  703.  /slant xdef
  704.  /deltay xdef
  705.  /deltax xdef
  706.  
  707.  pmatrix setmatrix deltax deltay translate
  708.  sclm 0 twist cos put sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat
  709.  /omatrix omatrix currentmatrix def
  710. }bdef
  711.  
  712. %
  713. % EO
  714. %
  715. /EO {pmatrix setmatrix}bdef
  716.  
  717. %
  718. % - BEGINCLIP -
  719. %
  720. /BeginClip {/PGSClipSave save def clip}bdef
  721.  
  722. %
  723. % - ENDCLIP -
  724. %
  725. /EndClip {PGSClipSave restore}bdef
  726.  
  727. %
  728. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINBITMAP -
  729. %
  730. /BeginBitmap {
  731.  /bpp xdef /h xdef /w xdef
  732.  scl translate scale save /picstr 8 bpp idiv dup w add 1 sub exch idiv string def
  733.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind image
  734. }bdef
  735.  
  736. %
  737. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINRGBBITMAP -
  738. %
  739. /BeginRGBBitmap {
  740.  /bpp xdef /h xdef /w xdef
  741.  scl translate scale save /picstr 8 bpp idiv dup w 3 mul add 1 sub exch idiv string def
  742.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind false 3 colorimage
  743. }bdef
  744.  
  745. %
  746. % - ENDBITMAP -
  747. %
  748. /EndBitmap {restore omatrix setmatrix}bdef
  749.  
  750. %
  751. % xscalex yscale xoffset yoffset BEGINEPS -
  752. %
  753. /BeginEPS {
  754.  scl translate scale translate
  755.  /PGSEPSSave save def /showpage {}bdef
  756.  newpath [] 0 setdash 1 setlinewidth 0 setgray
  757. }bdef
  758.  
  759. %
  760. % - ENDEPS -
  761. %
  762. /EndEPS {PGSEPSSave restore}bdef
  763.  
  764. %
  765. % angle cx cy cropmark -
  766. %
  767. /cropmark {
  768.   gsave translate 1 tilescalex div 1 tilescaley div scale rotate
  769.   .3 setlinewidth newpath
  770.   bh 5 add 0 moveto 20 0 rlineto
  771.   0 bv 5 add moveto 0 20 rlineto
  772.   stroke grestore
  773. }bdef
  774.  
  775. %
  776. % dx dy cx cy regmark -
  777. %
  778. /regmark {
  779.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  780.   .3 setlinewidth newpath
  781.   10 0 moveto 0 0 10 0 360 arc
  782.   1 SG fill
  783.   8 0 moveto 0 0 8 0 360 arc
  784.   -10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto
  785.   0 SG stroke
  786.   4 0 moveto 0 0 4 0 360 arc
  787.   fill
  788.   -4 0 moveto 4 0 lineto 0 -4 moveto 0 4 lineto
  789.   1 SG stroke
  790.   grestore
  791. }bdef
  792.  
  793. %
  794. % dx dy cx cy slurgauge -
  795. %
  796. /slurgauge {
  797.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  798.   .3 setlinewidth newpath
  799.   0 0 10 0 360 arc
  800.   1 SG fill
  801.   0 0 10 0 360 arc
  802.   0 SG stroke
  803.   36 { 1 0 moveto 0 0 10 -2.5 2.5 arc fill 10 rotate}repeat
  804.   grestore
  805. }bdef
  806.  
  807. /boxit {newpath moveto 14 0 rlineto 0 -14 rlineto -14 0 rlineto closepath}def
  808.  
  809. %
  810. % angle dx dy cx cy colorstrip -
  811. %
  812. /colorstrip {
  813.   gsave translate 1 tilescalex div 1 tilescaley div scale translate rotate
  814.  
  815.   /Courier findfont 6 scalefont setfont
  816.  
  817.   sepmode 1 eq {
  818.     0 8 translate
  819.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  820.    }if
  821.  
  822.   sepmode 2 eq sepmode 3 eq or {
  823.     gsave 320 15 translate
  824.     0 0 boxit .5 .41 .41 0 scmyk fill
  825.     15 0 boxit 0 0 0 .5 scmyk fill
  826.     30 0 boxit 1 1 0 0 scmyk fill
  827.     45 0 boxit 1 0 1 0 scmyk fill
  828.     60 0 boxit 0 1 1 0 scmyk fill
  829.     75 0 boxit 1 1 1 0 scmyk fill
  830.     1 SG
  831.     33 -6 moveto (CM) show
  832.     48 -6 moveto (CY) show
  833.     63 -6 moveto (MY) show
  834.     77 -6 moveto (CMY) show
  835.     grestore
  836.  
  837.  
  838.     0 0 0 1 scmyk -6 9 moveto (K) show
  839.     0 1 9 {dup 15 mul 15 boxit 10 div 0 0 0 4 -1 roll scmyk fill}for
  840.  
  841.     1 0 0 0 scmyk -6 -6 moveto (C) show
  842.     0 1 9 {dup 15 mul 0 boxit 10 div 0 0 0 scmyk fill}for
  843.  
  844.     0 1 0 0 scmyk 154 9 moveto (M) show
  845.     0 1 9 {dup 15 mul 160 add 15 boxit 10 div 0 exch 0 0 scmyk fill}for
  846.  
  847.     0 0 1 0 scmyk 154 -6 moveto (Y) show
  848.     0 1 9 {dup 15 mul 160 add 0 boxit 10 div 0 0 3 -1 roll 0 scmyk fill}for
  849.  
  850.    }if
  851.  
  852.   sepmode 4 eq {
  853.     320 0 translate
  854.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  855.    }if
  856.  
  857.   grestore
  858. }def
  859.  
  860. %
  861. % title1 title2 tilew tileh PRINTERSMARKS -
  862. %
  863. /PrintersMarks {
  864.  /tileh xdef
  865.  /tilew xdef
  866.  /title2 xdef
  867.  /title1 xdef
  868.  
  869.  gsave 0 SG [] 0 setdash 0 setlinejoin 0 setlinecap
  870.  
  871.  180 0 0 cropmark
  872.  270 tilew 0 cropmark
  873.  0 tilew tileh cropmark
  874.  90 0 tileh cropmark
  875.  
  876.  0 15 bv add tilew 2 div tileh regmark
  877.  0 -15 bv sub tilew 2 div 0 regmark
  878.  
  879.  -15 bh sub -15 bv sub 0 0 slurgauge
  880.  15 bh add 15 bv add tilew tileh slurgauge
  881.  
  882.   gsave 1 tilescalex div 1 tilescaley div scale -15 bh sub 8 translate 90 rotate
  883.   /Courier findfont 8 scalefont setfont
  884.   0 0 moveto title1 show
  885.   0 -8 moveto title2 show (  ) show
  886.   currentscreen pop exch 20 string cvs show ( lpi  ) show
  887.   20 string cvs show (\312  ) show
  888.   tilescalex 100 mul 20 string cvs show (%) show
  889.   tilescaley tilescalex ne {(,) show tilescaley 100 mul 20 string cvs show (%) show}if
  890.   grestore
  891.  
  892.  90 bh 15 add 15 tilew 0 colorstrip
  893.  grestore
  894. }bdef
  895.  
  896. end
  897. %%EndProlog
  898.